//
//  SettingAppVC.m
//  VISTA看天下
//
//  Created by  on 15/12/6.
//  Copyright © 2015年. All rights reserved.
//

#import "SettingAppVC.h"

@implementation SettingAppVC




- (void)viewDidLoad
{
    [self configNavi];
}


- (void)configNavi
{
    self.view.backgroundColor = [UIColor whiteColor];
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"NAVI"] forBarMetrics:UIBarMetricsDefault];
    
    //定制导航栏左按钮
    UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
    leftButton.frame = CGRectMake(0, 0, 50, 32);
    [leftButton setImage:[UIImage imageNamed:@"返回_1"] forState:UIControlStateNormal];
    [leftButton setImage:[UIImage imageNamed:@"返回_2"] forState:UIControlStateHighlighted];
    [leftButton addTarget:self action:@selector(pop) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithCustomView:leftButton];
    self.navigationItem.leftBarButtonItem = leftItem;
    //导航栏标题
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 50, 30)];
    titleLabel.text = self.title;
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    self.navigationItem.titleView = titleLabel;
}
- (void)pop
{
    [self.navigationController popViewControllerAnimated:YES];
}
@end
